#ifndef DW_SYSTEM_APPLICATION_H
#	define DW_SYSTEM_APPLICATION_H

namespace dw {
	namespace system {

class Application
{
public : //! @name Types definitions
	//! @{
	struct Setup;
	//! @}

public : //! @name Commands
	//! @{
	void run(int argc, char** argv);
	void stop();
	//! @}

public : //! @name Events
	//! @{
	virtual bool onSetup(int argc, char** argv) = 0;
	virtual void onIdle() = 0;
	virtual void onShutdown() = 0;
	//! @}

public : //! @name State
	//! @{
	virtual Setup& getSetup() = 0;

	bool isRunning() const { return _isRunning; }
	bool mustStop() const { return _mustStop; }
	//! @}

protected : //! @name Construction & destruction
	//! @{
	Application();
	virtual ~Application();
	//! @}

private : //! @name Data
	//! @{
	bool _isRunning;
	bool _mustStop;
	//! @}
};

	} // namespace system;
} // namespace dw;

#endif // !DW_SYSTEM_APPLICATION_H
